@import "~@/styles/theme.less";

.chaincode-page {
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 1);
	border-radius: 2px;
	position: relative;
	padding: 24px;
	.document {
		margin-left: 8px;
		display: inline-block;
		cursor: pointer;
		font-size: 12px;
		font-weight: 400;
		color: @primary-color;
		img {
			margin-top: -2.5px;
			margin-left: 6px;
		}
	}

	.chaincode-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 24px;
		.create {
			width: 88px;
			height: 32px;
			background: @primary-color;
			border-radius: 2px;
			box-shadow: none;
			text-shadow: none;
			padding: 0;
			text-align: center;
			line-height: 30px;
			font-size: 12px;
			border: 1px solid @primary-color;
			font-weight: 400;
			color: rgba(255, 255, 255, 1);
		}
		.create + .create {
			margin-left: 8px;
		}
		.search {
			width: 264px;
			height: 32px;
			border-radius: 4px;
			border: 1px solid #d9dde0;
			display: flex;
			padding: 5px 12px;
			align-items: center;
			background-color: #ffffff;
			.search-input {
				width: 227px;
				color: #171e2d;
				outline: none;
				font-size: 12px;
				font-weight: 400;
			}

			.search-btn {
				flex: 1;
				display: flex;
				align-items: center;
				justify-content: center;
				cursor: pointer;
			}
		}
	}

	.circle {
		animation: antStatusProcessing 1.2s infinite ease-in-out;
		width: 4px;
		margin-right: 6px;
		height: 4px;
		border-radius: 50%;
	}
	.peers {
		max-width: 197px;
		line-height: 22px;
	}
	.contract-status {
		font-size: 12px;
		font-weight: 400;
		display: flex;
		margin-left: 3px;
		align-items: center;
	}
	.ready,
	.yet-install {
		color: rgba(239, 138, 43, 1);
		.circle {
			box-shadow: 0 0 0 3px rgba(239, 138, 43, 0.2);
			background-color: rgba(239, 138, 43, 1);
		}
	}
	.yet-deploy,
	.yet-upgrade {
		color: #13c111;
		.circle {
			box-shadow: 0 0 0 3px #c6fdc5;
			background-color: #13c111;
		}
	}
	.pending {
		color: @primary-color;
		.circle {
			box-shadow: 0 0 0 3px rgba(0, 146, 255, 0.2);
			background-color: @primary-color;
		}
	}
	.deploy-failed,
	.install-failed,
	.upgrade-failed {
		color: #e53232;
		.circle {
			box-shadow: 0 0 0 3px rgba(229, 50, 50, 0.2);
			background-color: #e53232;
		}
		.show-text {
			text-decoration: underline;
			cursor: pointer;
		}
	}
}
.tooltip-chaincode {
	.ant-tooltip-inner {
		width: 220px;
		word-break: break-all;
		word-wrap: break-word;
		padding: 12px;
		font-size: 12px;
		font-weight: 500;
		line-height: normal;
		color: #ffffff;
		background: rgba(17, 39, 88, 0.6);
		box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
	}
	.ant-tooltip-arrow {
		border-top-color: rgba(17, 39, 88, 0.6) !important;
	}
}
.operation-log-modal {
	.ant-modal {
		padding-bottom: 0px;
	}

	.ant-modal-body {
		.handle-scrollBar {
			max-height: 598px;
			overflow-y: auto;
			.operation-failed {
				font-size: 12px;
				font-weight: 400;
				color: rgba(229, 50, 50, 1);
			}
			.operation-success {
				font-size: 12px;
				font-weight: 400;
				color: #13c111;
			}
			.message {
				font-size: 12px;
				color: rgba(23, 30, 45, 1);
			}
		}
	}
}
.upgrade-modal {
	.ant-modal-body {
		padding-bottom: 27px;
		.empty-data {
			padding: 68px 0px;
			text-align: center;
			img {
				width: auto;
				margin: 16px auto 0 auto;
			}
			font-size: 12px;
			font-weight: 400;
			color: rgba(15, 21, 29, 0.4);
			line-height: 20px;
		}
	}
	.ugrade-form {
		.ant-form-item {
			margin-bottom: 0px;
			&:not(:first-of-type) {
				margin-top: 16px;
			}
			&:nth-of-type(3) {
				margin-top: 8px;
				.ant-form-item-label > label {
					margin-top: 8px;
				}
			}
			.ant-form-item-label > label {
				justify-content: flex-end;
				width: 70px;
				font-size: 12px;
				line-height: 32px;
				font-weight: 400;
				color: rgba(23, 30, 45, 1);
				text-align: right;
				&::after {
					margin: 0px;
				}
			}
		}
		.ant-form-item-has-error .ant-form-item-explain,
		.ant-form-item-has-error .ant-form-item-split {
			color: #e53232;
		}
		.desc {
			height: 32px;
			background: rgba(248, 248, 248, 1);
			border-radius: 2px;
			border: 1px solid rgba(217, 221, 224, 1);
			line-height: 30px;
			padding: 0 12px;
			font-size: 12px;
			font-weight: 400;
			color: rgba(23, 30, 45, 0.6);
		}
		.ant-select {
			width: 100%;
		}
		//select通用样式
		.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
			height: 32px;
			background: rgba(255, 255, 255, 1);
			border-radius: 2px;
			border: 1px solid rgba(217, 221, 224, 1);
			padding: 0 12px;
			&:hover {
				border-color: @primary-color;
			}
		}
		.ant-select-single .ant-select-selector .ant-select-selection-search {
			position: absolute;
			top: 0;
			right: 12px;
			bottom: 0;
			left: 12px;
		}
		.ant-select-multiple .ant-select-selector {
			border: 1px solid #d9dde0;
			padding: 1px 12px;
			&:hover {
				border-color: @primary-color;
			}
		}

		.ant-select-arrow {
			top: 53%;
			right: 12px;
			margin-top: -6px;
			color: #747881;
		}
		.ant-select-dropdown {
			box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.1);
		}
		.ant-select-item {
			min-height: 28px;
			padding: 3px 16px;
			color: rgba(23, 30, 45, 0.65);
			font-size: 12px;
			font-weight: 400;
			line-height: 22px;
		}
		.ant-select:not(.ant-select-disabled):hover .ant-select-selector {
			border-color: @primary-color;
		}
		input::-webkit-input-placeholder {
			font-size: 12px;
			font-weight: 400;
			color: rgba(23, 30, 45, 0.25);
		}
		input::-moz-placeholder {
			font-size: 12px;
			font-weight: 400;
			color: rgba(23, 30, 45, 0.25);
		}
		input:-moz-placeholder {
			font-size: 12px;
			font-weight: 400;
			color: rgba(23, 30, 45, 0.25);
		}
		input:-ms-input-placeholder {
			font-size: 12px;
			font-weight: 400;
			color: rgba(23, 30, 45, 0.25);
		}
	}
	.ant-modal-footer {
		padding: 11px 32px;
		border-top: 1px solid #f8f8f8;
	}
	::-webkit-scrollbar {
		width: 8px;
	}
	::-webkit-scrollbar-track-piece {
		background-color: transparent;
	}
	/*滑块*/
	::-webkit-scrollbar-thumb {
		height: 214px;
		background-color: #e2e2e2;
		border-radius: 4px;
	}
	.upload-btn {
		width: 107px;
		padding: 0px;
		text-align: center;
		border: 1px solid rgba(217, 221, 224, 1);
		line-height: 30px;
		box-shadow: none;
		font-size: 12px;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: rgba(23, 30, 45, 0.65);
		&:hover {
			border-color: @primary-color;
		}
	}
	.ant-upload-list-item {
		margin-top: 12px;
		font-family: PingFangSC-Regular, PingFang SC;
	}
	.ant-upload-list-item-info {
		padding: 0;
	}
	.ant-upload-list-item:hover .ant-upload-list-item-info {
		background-color: transparent;
	}
	.ant-upload-list-item-info .anticon-loading .anticon,
	.ant-upload-list-item-info .ant-upload-text-icon .anticon {
		color: rgba(23, 30, 45, 0.65);
	}
	.ant-upload-list-item-error,
	.ant-upload-list-item-error .ant-upload-text-icon > .anticon,
	.ant-upload-list-item-error .ant-upload-list-item-name {
		color: #e53232;
	}
	.ant-upload-list-item-name {
		font-size: 12px;
		font-weight: 400;
		color: rgba(23, 30, 45, 0.65);
	}
	.reload {
		position: absolute;
		bottom: 0px;
		right: 16px;
		cursor: pointer;
		z-index: 999;
	}
	.remove-image {
		cursor: pointer;
		position: absolute;
		right: 0;
		top: 3px;
	}
	.upload-btn {
		position: relative;
		z-index: 1;
	}
	.input-upload {
		position: absolute;
		z-index: 0;
		left: 0px;
		width: 107px;
		height: 32px;
		opacity: 0;
		top: 0px;
		cursor: pointer;
	}
	.file-list {
		position: relative;
		display: flex;
		width: 320px;
		margin-top: 12px;
		font-size: 12px;
		font-weight: 400;
		color: rgba(23, 30, 45, 0.65);
		line-height: 22px;
		.anticon-loading,
		.anticon-link {
			font-size: 16px;
			margin-right: 4px;
		}
		.filename {
			flex: 1;
			margin-top: -3px;
			position: relative;
			.ant-progress-inner {
				background-color: #f8f8f8;
				border-radius: 1px;
			}
			.ant-progress-line {
				position: absolute;
				bottom: -11px;
			}
		}
	}
	.params-wrap {
		display: inline-block;
		max-width: calc(100% - 70px);
	}
	.parameter-tag {
		margin-top: 8px;
		height: 32px;
		display: inline-block;
		border-radius: 2px;
		border: solid 1px #d9dde0;
		background-color: #ffffff;
		line-height: 32px;
		padding: 0 8px;
		font-size: 12px;
		font-weight: 400;
		color: rgba(0, 0, 0, 0.65);
		margin-right: 4px;
		img {
			margin-top: -2px;
		}
	}
	.params-input {
		margin-top: 4px;
		border: 1px solid #d9dde0;
		color: rgba(0, 0, 0, 0.65);
		padding: 0px 8px;
		height: 32px;
		line-height: 30px;
		&:hover {
			border-color: @primary-color;
		}
		&:focus {
			border-color: @primary-color;
			box-shadow: 0px 6px 18px 0px rgba(20, 30, 44, 0.1);
		}
	}

	.clear {
		height: 31px;
		margin-top: 8px;
		cursor: pointer;
		line-height: 31px;
		margin-left: 4px;
		display: inline-block;
		width: 66px;
		text-align: center;
		background: rgba(255, 255, 255, 1);
		border-radius: 2px;
		border: 1px dashed rgba(17, 46, 84, 0.3);
		font-size: 12px;
		font-weight: 400;
		color: rgba(17, 46, 84, 0.3);
	}
	.add {
		width: 66px;
		height: 31px;
		margin-top: 8px;
		cursor: pointer;
		line-height: 31px;
		display: inline-block;
		text-align: center;
		background: rgba(255, 255, 255, 1);
		border-radius: 2px;
		border: 1px dashed @primary-color;
		font-size: 12px;
		font-weight: 400;
		color: @primary-color;
	}
	.ant-progress-success-bg,
	.ant-progress-bg {
		position: relative;
		background-color: @primary-color;
		border-radius: 1px;
		height: 2px !important;
	}
}
.document-modal {
	.api-address {
		font-size: 12px;
		font-weight: 400;
		color: rgba(23, 30, 45, 0.85);
		line-height: 22px;
	}
	.link {
		margin-top: 24px;
		input {
			width: 330px;
			padding: 4px 16px;
			font-size: 12px;
			border: 1px solid rgba(238, 248, 255, 1);
			font-weight: 400;
			color: rgba(23, 30, 45, 0.65);
			background: rgba(238, 248, 255, 1);
		}
	}
	.see-document {
		cursor: pointer;
		margin-top: 8px;
		font-size: 12px;
		font-weight: 400;
		color: @primary-color;
		img {
			margin-left: 6px;
		}
	}
}
.deleteModalConfirm {
	width: 424px;
	height: 192px;
	background: rgba(255, 255, 255, 1);
	box-shadow: 0px 12px 48px 16px rgba(0, 0, 0, 0.03),
		0px 9px 28px 0px rgba(0, 0, 0, 0.05), 0px 6px 16px -8px rgba(0, 0, 0, 0.08);
	border-radius: 2px;
	.ant-modal-icon {
		float: left;
		width: 21px;
		height: 21px;
		color: #fff;
		background: rgba(255, 176, 17, 1);
		border-radius: 10px;
		text-align: center;
		margin-right: 16px;
	}
	.ant-modal-confirm-content {
		width: 320px;
		height: 44px;
		font-size: 12px;
		font-weight: 400;
		color: rgba(23, 30, 45, 0.65);
		line-height: 22px;
		margin-left: 37px;
		margin-top: 12px;
	}
}
.create-chain-modal {
	.ant-modal-body {
		padding: 0;

		.ant-tabs .ant-tabs-left-content {
			padding-left: 0px;
			height: 464px;
			overflow-y: auto;
			border-left: 1px solid #e9e9e9;
		}
		.ant-tabs-content {
			height: 464px;
			overflow-y: auto;
		}
		.ant-tabs-left
			> .ant-tabs-content-holder
			> .ant-tabs-content
			> .ant-tabs-tabpane,
		.ant-tabs-left
			> div
			> .ant-tabs-content-holder
			> .ant-tabs-content
			> .ant-tabs-tabpane {
			padding-left: 0px;
		}
		.ant-tabs-left > .ant-tabs-content-holder,
		.ant-tabs-left > div > .ant-tabs-content-holder {
			margin-left: -1px;
			border-left: 1px solid #e9e9e9;
		}
		.ant-tabs .ant-tabs-left-bar {
			border-right: 1px solid #e9e9e9;
			margin-top: 24px;
		}
		.ant-tabs > .ant-tabs-nav,
		.ant-tabs > div > .ant-tabs-nav {
			margin-top: 24px;
		}
		.ant-tabs-left > .ant-tabs-nav .ant-tabs-ink-bar,
		.ant-tabs-left > div > .ant-tabs-nav .ant-tabs-ink-bar,
		.ant-tabs-right > .ant-tabs-nav .ant-tabs-ink-bar,
		.ant-tabs-right > div > .ant-tabs-nav .ant-tabs-ink-bar {
			width: 0px !important;
		}
		.upload_chaincode_form_box {
      width: 85%;
			margin: 24px auto;
			.ant-form-item-has-error .ant-form-item-explain,
			.ant-form-item-has-error .ant-form-item-split {
				color: #e53232;
			}
			.ant-upload {
				.ant-btn {
					width: 107px;
					box-shadow: none;
					border: 1px solid #d9dde0;
					font-size: 12px;
					font-weight: 400;
					color: rgba(23, 30, 45, 0.65);
					&:hover {
						border-color: @primary-color;
					}
					&:focus {
						border-color: @primary-color !important;
						box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2) !important;
					}
				}
			}
			.ant-form-item-has-error {
				.ant-upload {
					.ant-btn {
						border: 1px solid #e53232;
					}
				}
			}
			.contractFilename {
				margin-top: 8px;
				color: @primary-color;
				.ellipsis-lines(1);
			}
			.ant-form-item-has-error {
				.input {
					border-color: #e53232;
				}
			}
			.ant-form-item {
				margin-bottom: 0px;
			}
			.ant-form-item textarea.ant-input {
				height: 100px;
				background: rgba(255, 255, 255, 1);
				border-radius: 2px;
				border: 1px solid rgba(217, 221, 224, 1);
				&:hover {
					border-color: @primary-color;
				}
				&:focus {
					border-color: @primary-color !important;
					box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2) !important;
				}
			}
		}
		.listItemContent {
			.chaincode_cardItem {
				border-color: #dce2ee;
				border-radius: 4px;
				height: 224px;
			}
		}
	}
	.ant-modal-footer {
		margin-left: 138px;
	}

	.ant-tabs .ant-tabs-left-bar .ant-tabs-ink-bar {
		height: 0px !important;
		width: 0px !important;
	}
	.ant-list {
		padding: 24px 24px 0 24px;
	}
	.ant-tag {
		padding: 0 6px;
		line-height: 22px;
		border: none;
		background: rgba(64, 158, 255, 0.15);
		border-radius: 1px;
		height: 22px;

		font-size: 12px;
		color: rgba(23, 30, 45, 0.65);
	}
	.cardDescription_chainCodePage {
		.displaytit_chainCodePage {
			display: flex;
			align-items: center;
			font-size: 16px;
			font-weight: 400;
			color: rgba(23, 30, 45, 1);
			line-height: 22px;
			.cardItem_version_chainCodePage {
				min-width: 35px;
				text-align: center;
				padding: 0 6px;
				margin-left: 8px;
				height: 16px;
				line-height: 16px;
				font-size: 12px;
				color: rgba(23, 30, 45, 0.65);
				background: rgba(0, 0, 0, 0.04);
				border-radius: 1px;
			}
		}
		.cardItem_englishName_chainCodePage {
			font-size: 12px;
			margin-bottom: 8px;
			color: rgba(23, 30, 45, 0.25);
			line-height: 20px;
		}
		.cardItem_description_chainCodePage {
			font-size: 12px;
			font-weight: 400;
			color: rgba(23, 30, 45, 0.45);
			line-height: 20px;
			max-height: 40px;
			margin-bottom: 8px;
      .ellipsis-lines(2);
		}
		.add-contract {
			margin-top: 24px;
			border: none;
			line-height: 32px;
			padding: 0px;
			text-align: center;
			text-shadow: none;
			box-shadow: none;
			width: 100px;
			font-size: 12px;
			font-weight: 400;
			color: rgba(255, 255, 255, 1);
		}
	}
	.ant-list-grid .ant-col > .ant-list-item {
		margin-bottom: 24px;
	}
}
.service-modal {
	.ant-modal-body {
		padding: 0px;
		.ant-tabs .ant-tabs-left-content {
			height: 520px;
		}

		.ant-tabs-content {
			height: 520px;
		}
	}
}

.install-modal {
	.ugrade-form {
		.ant-form-item {
			&:nth-of-type(3) {
				margin-top: 16px;
				.ant-form-item-label > label {
					margin-top: 0px;
				}
			}
		}
	}
}
.tooltip-style {
	.ant-tooltip-inner {
		padding: 5px 12px;
		background: rgba(0, 0, 0, 0.8);
		box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
		border-radius: 0px;
		font-size: 12px;
		font-weight: 400;
		color: rgba(255, 255, 255, 1);
		line-height: 22px;
	}
	.ant-tooltip-arrow::before {
		background: rgba(0, 0, 0, 0.8);
	}
}
@keyframes antStatusProcessing {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(0.8);
	}
	100% {
		transform: scale(1);
	}
}
